package com.bw.find_module.recommend;

import com.bw.adapter_sdk.quick.BaseQuickAdapter;
import com.bw.adapter_sdk.quick.BaseViewHolder;
import com.bw.find_module.R;
import com.bw.find_module.entity.RecommendValuesEntity;

public class RecommendAdapter extends BaseQuickAdapter<RecommendValuesEntity> {

    public RecommendAdapter() {
        super(R.layout.item_recommend);
        addItemChildClick(R.id.item_recommend_attent);
        addItemChildClick(R.id.item_recommend_artist_img);
    }

    @Override
    public void convert(BaseViewHolder holder, RecommendValuesEntity item) {
        holder.setText(R.id.item_recommend_artist,item.title);
        holder.setText(R.id.item_recommend_content,item.intro);
        holder.setCirImage(R.id.item_recommend_artist_img,item.icon);

        if (!item.hasFollow)
            holder.setText(R.id.item_recommend_attent,"关注");
        else
            holder.setText(R.id.item_recommend_attent,"取消关注");

    }
}
